<%@page import="com.shsh.safemanage.action.ActionCreator"%>
<%@page import="com.shsh.safemanage.action.PostcheckReportAction"%>
<%@page import="com.shsh.safemanage.model.PostcheckMonthQualityReport.ChushiReport"%>
<%@page import="com.shsh.safemanage.model.Department1"%>
<%@page import="com.shsh.safemanage.model.PostcheckMonthQualityReport"%>
<%@page import="com.shsh.safemanage.dao.PostCheckDao"%>
<%@page import="com.shsh.safemanage.util.Constants"%>
<%@page import="com.shsh.safemanage.util.RequestUtil"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%
{

Integer year = RequestUtil.getParameter(request, Constants.REQUEST_PARAMETER_YEAR, 0);
Integer month = RequestUtil.getParameter(request, Constants.REQUEST_PARAMETER_MONTH, 0);
int[] months = Util.getSeasonMonth(month);

PostCheckDao postcheckDao = DaoCreator.createPostCheckDao();

PostcheckMonthQualityReport report = postcheckDao.getMonthQualityReport(year, month);
if(report == null){
	int[] current = Util.getCurrentDate();
	if(year == current[0] && month == current[1]) {
		//是当月
		PostcheckReportAction reportAction = ActionCreator.createPostcheckReportAction();
		report = reportAction.createQualityReport(year, month);
	}
}
%>
<div class="hider" id="hider">
	<span>&nbsp;</span>
</div>
<div class="position">
	<img src="images/position2.jpg" style="padding: 7px 9px; float: left;" />当前位置：上海高桥分公司问题管理平台 &gt;&gt; 岗检汇总统计 &gt;&gt;<%=month %>月处室岗检质量评价表
</div>
<div class="tt">《职能处室岗检质量评价表》</div>
<div class="content" style="width:1500px;">
	<div style="margin-left: 10px">
	<span id="monthSelectSpan" style="margin-left: 10px;float:left;">	
	<%@include file="/postcheck_select/month_select_section2.jsp" %>
	</span>
	</div>
<%
if(report == null ||  report.getChushiReportMap().size()==0) {
%>
<div class="content" style="">
	<div style="float:left;padding-left:45%;padding-top:60px;font-size:14px;font-weight:bold;font-family:'微软雅黑','宋体';">未填报</div>
</div>
<%
	return;
}
%>
<table border="1" width="99%" style="align:center; margin-left: 6px">
	<tr>
		<td rowspan="2" style="text-align:center;width:10%;" class="td3">
		单位
		</td>
		<td rowspan="2" style="text-align:center;width:3%;" class="td3">
		部门管理人员数
		</td>
		<td rowspan="2" style="text-align:center;width:3%;" class="td3">
		参加岗检人数
		</td>
		<td colspan="3" style="text-align:center;" class="td3">
		季度计划被检单位总数
		</td>
		<td colspan="3" style="text-align:center;" class="td3">
		实际岗检单元总数
		</td>
		<td colspan="3" style="text-align:center;" class="td3">
		季度实际岗检人次数
		</td>
		<td colspan="3" style="text-align:center;" class="td3">
		查出问题数
		</td>
		<td colspan="3" style="text-align:center;" class="td3">
		考核扣分
		</td>
		<td colspan="3" style="text-align:center;" class="td3">
		查出“三违”现象次数
		</td>
		<td colspan="4" style="text-align:center;" class="td3">
		岗检计划完成率
		</td>
		<td colspan="4" style="text-align:center;" class="td3">
		岗检工作参与度
		</td>
		<td colspan="4" style="text-align:center;" class="td3">
		岗检问题覆盖面
		</td>
		<td colspan="4" style="text-align:center;" class="td3">
		查出“三违”现象得分
		</td>
		<td colspan="4" style="text-align:center;" class="td3">
		岗检评价得分
		</td>
	</tr>
	<tr>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[0]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[1]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[2]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[0]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[1]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[2]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[0]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[1]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[2]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[0]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[1]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[2]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[0]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[1]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[2]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[0]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[1]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[2]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[0]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[1]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[2]%>月
		</td>
		<td style="text-align:center;width:3%;" class="td3">
		平均值
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[0]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[1]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[2]%>月
		</td>
		<td style="text-align:center;width:3%;" class="td3">
		平均值
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[0]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[1]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[2]%>月
		</td>
		<td style="text-align:center;width:3%;" class="td3">
		平均值
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[0]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[1]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[2]%>月
		</td>
		<td style="text-align:center;width:3%;" class="td3">
		平均值
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[0]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[1]%>月
		</td>
		<td style="text-align:center;width:2%;" class="td3">
		<%=months[2]%>月
		</td>
		<td style="text-align:center;width:3%;" class="td3">
		平均值
		</td>
	</tr>
<%
for(Long chushiID: report.getChushiList().keySet()) {
	Department1 chushi = report.getChushiList().get(chushiID);
	ChushiReport chushiReport = report.getChushiReportMap().get(chushiID);
	if(chushiReport == null ) {
		continue;
	}
%>
	<tr>
		<td style="text-align:center;" class="td3">
		<%=Util.getDisplay(chushi.getDepartmentName(), "&nbsp;") %>
		</td>
		<td style="text-align:center;width:30px;" >
			<%=Util.getDisplay(chushiReport.getEmployeeCount(), "&nbsp;") %>
		</td>
		<td style="text-align:center;width:30px;" >
			<%=Util.getDisplay(chushiReport.getWorkerCount(), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getCheckUnitCountNeed()[0], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getCheckUnitCountNeed()[1], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getCheckUnitCountNeed()[2], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getCheckUnitCountReal()[0], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getCheckUnitCountReal()[1], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getCheckUnitCountReal()[2], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getMantimeReal()[0], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getMantimeReal()[1], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getMantimeReal()[2], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getProblemCount()[0], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getProblemCount()[1], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getProblemCount()[2], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getGradeSum()[0]==null?null:Util.formatGrade(chushiReport.getGradeSum()[0]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getGradeSum()[1]==null?null:Util.formatGrade(chushiReport.getGradeSum()[1]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getGradeSum()[2]==null?null:Util.formatGrade(chushiReport.getGradeSum()[2]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getIsSanweiCount()[0], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getIsSanweiCount()[1], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getIsSanweiCount()[2], "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getFinishRate()[0]==null?null:Util.formatRate(chushiReport.getFinishRate()[0]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getFinishRate()[1]==null?null:Util.formatRate(chushiReport.getFinishRate()[1]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getFinishRate()[2]==null?null:Util.formatRate(chushiReport.getFinishRate()[2]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getFinishRate()[3]==null?null:Util.formatRate(chushiReport.getFinishRate()[3]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getPartakeRate()[0]==null?null:Util.formatRate(chushiReport.getPartakeRate()[0]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getPartakeRate()[1]==null?null:Util.formatRate(chushiReport.getPartakeRate()[1]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getPartakeRate()[2]==null?null:Util.formatRate(chushiReport.getPartakeRate()[2]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getPartakeRate()[3]==null?null:Util.formatRate(chushiReport.getPartakeRate()[3]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getCoverageRate()[0]==null?null:Util.formatRate(chushiReport.getCoverageRate()[0]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getCoverageRate()[1]==null?null:Util.formatRate(chushiReport.getCoverageRate()[1]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getCoverageRate()[2]==null?null:Util.formatRate(chushiReport.getCoverageRate()[2]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getCoverageRate()[3]==null?null:Util.formatRate(chushiReport.getCoverageRate()[3]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getSanweiRate()[0]==null?null:Util.formatRate(chushiReport.getSanweiRate()[0]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getSanweiRate()[1]==null?null:Util.formatRate(chushiReport.getSanweiRate()[1]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getSanweiRate()[2]==null?null:Util.formatRate(chushiReport.getSanweiRate()[2]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getSanweiRate()[3]==null?null:Util.formatRate(chushiReport.getSanweiRate()[3]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getAssessRate()[0]==null?null:Util.formatRate(chushiReport.getAssessRate()[0]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getAssessRate()[1]==null?null:Util.formatRate(chushiReport.getAssessRate()[1]), "&nbsp;") %>
		</td>
		<td style="text-align:center;" >
			<%=Util.getDisplay(chushiReport.getAssessRate()[2]==null?null:Util.formatRate(chushiReport.getAssessRate()[2]), "&nbsp;") %>
		</td>
		<td style="text-align:center;font-weight:bold;" >
			<%=Util.getDisplay(chushiReport.getAssessRate()[3]==null?null:Util.formatRate(chushiReport.getAssessRate()[3]), "&nbsp;") %>
		</td>
	</tr>	
<%
}
%>
	<tr>

			<td style="text-align:center;" class="td3">
			汇总统计人
			</td>
			<td colspan="5" style="text-align:center;">
				<%=Util.getDisplay(report.getChushiWriteUserName(),"&nbsp;") %>
			</td>
			<td colspan="3" style="text-align:center;" class="td3">
			日期
			</td>
			<td colspan="6" style="text-align:center;">
				<%=Util.getDisplay(report.getChushiWriteTime()==null?null:Util.formatDate(report.getChushiWriteTime()),"&nbsp;") %>
			</td>
			<td colspan="26" style="text-align:center;">
				&nbsp;
			</td>
	</tr>
</table>
</div>
<script type="text/javascript">
function changeReport(){
	var year = getElementValueByID('year');
	var month = getElementValueByID('month');
	loadPageSection(
			'<%=request.getContextPath()%>/postcheck/report/read_chushi_month_quality.jsp', 
			'mainContentDiv', 
			{
				year: year, 
				month: month 
			}, 
			true
	);
}
function selectYear(){
	changeReport();
}

function selectMonth(){
	changeReport();
}
</script>
<%
}
%>